<#--<#assign script="<script>alert(1)</script>">-->
<#assign css>
</#assign>
<#-- 引入布局指令的命名空间 -->
<#import "../layout/default-layout.ftl" as defaultLayout>
<#--<#import "section/index.js.ftl" as script>-->
<#assign script_own>
    <script src="/resource/script/lib/jquery.ajaxFileUpload.js"></script>
<script>
    $(function () {
        $('#btn-upload').on('click',function () {
            $.ajaxFileUpload({
                fileElementId: '#file-input',
                url: 'http://localhost:8089/upload',
                data: {extraData: '1'},
                success: function (data) {
                    console.log(data);
                }
            });
        });
    });
</script>
</#assign>
<#-- 调用布局指令 -->
<@defaultLayout.layout  css=""  script=script_own>

<input type="file" id="file-input" name="file">

<button id="btn-upload">上传</button>

</@defaultLayout.layout>



